:root {
  --bg-canvas: #0f172a;
  --bg-surface: #1e293b;
  --border-low: #334155;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --brand-cyan: #0ea5e9;
  --brand-cyan-light: #38bdf8;
  --status-success: #10b981;
  --status-danger: #ef4444;
  --status-planned: #d9c706;
  --font-sans:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  --radius-card: 12px;
  --radius-input: 6px;
  --transition-fast: 0.2s ease;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-sans);
}
body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  padding: 1rem;
  height: 100vh;
  overflow: hidden;
}
.app-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  grid-template-rows: auto minmax(0, 1fr);

  gap: 1.2rem;
  max-width: 1600px;
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--border-low);
  border-radius: var(--radius-card);
  box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  padding: 0.8rem;

  height: calc(100vh - 2rem);
  min-height: 0;

  align-items: stretch;
}
.sidebar {
  background: rgba(30, 41, 59, 0.96);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-card);
  padding: 0 0.75rem 1rem 0.75rem;
  box-shadow: 0 12px 18px -8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-low);

  height: 100%;
  min-height: 0;

  overflow-y: auto;
  scroll-behavior: smooth;
}
.sidebar,
.map-container {
  min-height: 0;
}
.itinerary-header {
  position: sticky;
  top: 0;
  background: rgba(30, 41, 59, 0.98);
  backdrop-filter: blur(8px);
  z-index: 10;
  padding: 0.7rem 0 0.7rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.itinerary-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 1;
  min-width: 0;
}
.itinerary-title-group h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--brand-cyan-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}
.button-group-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.compact-toggle-btn {
  background: var(--bg-canvas);
  color: var(--text-primary);
  border: none;
  font-size: 0.75rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-input);
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 88px;
  justify-content: center;
}
.compact-toggle-btn:hover {
  background: var(--border-low);
  color: var(--brand-cyan-light);
  transform: translateY(-1px);
}
.compact-toggle-btn i {
  font-size: 0.7rem;
}
.compact-toggle-btn.primary {
  background: var(--brand-cyan);
  color: var(--bg-canvas);
}
.compact-toggle-btn.primary:hover {
  background: var(--brand-cyan-light);
}
.add-leg-btn {
  background: var(--brand-cyan);
  color: var(--bg-canvas);
  border: none;
  font-size: 0.75rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-input);
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 88px;
  justify-content: center;
}
.add-leg-btn:hover {
  background: var(--brand-cyan-light);
  transform: translateY(-1px);
}
.add-leg-btn i {
  margin-right: 0px;
  font-size: 0.7rem;
}
.add-leg-btn .mobile-text {
  display: none;
}
.add-leg-btn .full-text {
  display: inline;
}
.header-bar {
  grid-column: 1 / -1;
  background: rgba(30, 41, 59, 0.96);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-card);
  padding: 0.5rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--border-low);
}
.title {
  font-size: 1.7rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--brand-cyan-light),
    var(--status-success)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.title i {
  background: none;
  color: var(--brand-cyan);
  margin-right: 8px;
}
.holiday-name-area {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  background: var(--bg-canvas);
  padding: 0.2rem 1rem;
  border-radius: var(--radius-input);
  border: 1px solid var(--border-low);
}
#holidayNameInput {
  border: 1px solid var(--border-low);
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-input);
  width: 280px;
  font-size: 0.85rem;
}
button,
.file-label {
  background: var(--bg-canvas);
  border: 1px solid var(--border-low);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-input);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}
button:hover,
.file-label:hover {
  background: var(--border-low);
  transform: translateY(-2px);
  border-color: var(--brand-cyan);
}
.itinerary-item {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  border-left: 5px solid var(--status-planned);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: all 0.2s ease;
}
.itinerary-item.leg-booked {
  border-left-color: var(--status-success);
}
.itinerary-item.leg-selected {
  border-left-color: #f59e0b;
  border-left-width: 7px;
}
.itinerary-item:hover {
  background: #26364f;
  transform: translateX(2px);
}
.itinerary-item.leg-planned:hover {
  border-left-color: #f59e0b;
}
.itinerary-item.leg-booked:hover {
  border-left-color: #34d399;
}
.itinerary-item.leg-selected:hover {
  border-left-color: #f59e0b;
}
.itinerary-item.highlight-new,
.compact-item.highlight-new {
  animation: highlightFlash 1.2s ease-in-out;
  border-left-color: var(--brand-cyan);
}
@keyframes highlightFlash {
  0% {
    background-color: #0b3048;
    border-left-width: 8px;
    box-shadow: 0 0 0 2px var(--brand-cyan);
  }
  50% {
    background-color: #164e63;
    border-left-width: 8px;
    box-shadow: 0 0 0 4px var(--brand-cyan-light);
  }
  100% {
    background-color: var(--bg-surface);
    border-left-width: 5px;
    box-shadow: none;
  }
}
.flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  align-items: flex-end;
}
.field {
  flex: 1;
  min-width: 90px;
  position: relative;
}
.field label {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-cyan-light);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  cursor: pointer;
}
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-low);
  border-radius: var(--radius-input);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}
.autocomplete-item {
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-low);
  transition: background 0.1s ease;
  color: var(--text-primary);
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover,
.autocomplete-item.selected {
  background: var(--border-low);
}
.calendar-icon {
  font-size: 0.7rem;
  color: var(--brand-cyan-light);
  cursor: pointer;
  opacity: 0.7;
}
.calendar-icon:hover {
  opacity: 1;
}
input,
select {
  width: 100%;
  padding: 0.45rem;
  border-radius: var(--radius-input);
  border: 1px solid var(--border-low);
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-size: 0.8rem;
}
.date-display-input {
  cursor: pointer;
  background: var(--bg-canvas);
}

.hidden-date-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.nights-badge {
  background: var(--bg-canvas);
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-input);
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--status-success);
  text-align: center;
  border: 1px solid var(--border-low);
}
.remove-btn {
  background: rgba(239, 68, 68, 0.12);
  color: var(--status-danger);
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  cursor: pointer;
}
.remove-btn:hover {
  background: rgba(239, 68, 68, 0.22);
}
.notes-btn {
  background: rgba(16, 61, 185, 0.448);
  color: var(--status-success);
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  cursor: pointer;
  border: 1px solid rgba(16, 129, 185, 0.35);
}
.notes-btn.planned,
.notes-btn.has-notes {
  background: rgba(16, 185, 129, 0.12);
  color: var(--status-success);
  border-color: rgba(16, 185, 129, 0.35);
}
.notes-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--status-success);
}
.notes-indicator {
  font-size: 0.65rem;
  margin-left: 4px;
  color: var(--status-success);
}
.booking-toggle-btn {
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  cursor: pointer;
  border-radius: var(--radius-input);
  border: 1px solid transparent;
  transition: background-color var(--transition-fast);
}
.booking-toggle-btn.planned {
  background: rgba(217, 119, 6, 0.12);
  color: var(--status-planned);
  border-color: rgba(217, 119, 6, 0.35);
}
.booking-toggle-btn.planned:hover {
  background: rgba(217, 119, 6, 0.22);
}
.booking-toggle-btn.booked {
  background: rgba(16, 185, 129, 0.12);
  color: var(--status-success);
  border-color: rgba(16, 185, 129, 0.35);
}
.booking-toggle-btn.booked:hover {
  background: rgba(16, 185, 129, 0.22);
}
.map-container {
  background: var(--bg-canvas);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-low);
  position: relative;
  display: flex;
  flex-direction: column;

  height: 100%;
  min-height: 0;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--bg-canvas);

  flex: 1;
  min-height: 0;
}
.map-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
}
.map-control-btn {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 0 8px 0 8px;
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(14, 165, 233, 0.35);
  border-right: 1px solid rgba(14, 165, 233, 0.35);
}
.map-control-btn i {
  font-size: 0.65rem;
  color: var(--brand-cyan-light);
}
.map-control-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--brand-cyan-light);
  transform: translateY(-1px);
}
.cost-summary {
  background: var(--bg-canvas);
  border: 1px solid var(--border-low);
  border-radius: var(--radius-card);
  padding: 0.7rem;
  margin-top: 0.8rem;
  font-weight: bold;
  color: var(--text-primary);
  font-size: 0.8rem;
}
.cost-summary div {
  margin: 4px 0;
  display: flex;
  justify-content: space-between;
}
.cost-summary .total {
  border-top: 2px solid var(--brand-cyan);
  margin-top: 6px;
  padding-top: 6px;
  font-size: 0.95rem;
}
.loading-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-surface);
  color: var(--brand-cyan-light);
  padding: 8px 16px;
  border-radius: var(--radius-input);
  z-index: 1000;
  display: none;
  font-size: 0.8rem;
}
.metro-zoom-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 0 8px 0 0;
  font-size: 0.7rem;
  font-weight: 500;
  z-index: 1000;
  border: none;
  border-top: 1px solid rgba(14, 165, 233, 0.35);
  border-right: 1px solid rgba(14, 165, 233, 0.35);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  pointer-events: none;
  transition: opacity 0.2s ease;
  letter-spacing: 0.3px;
  opacity: 0;
  visibility: hidden;
}
.metro-zoom-hint i {
  font-size: 0.7rem;
  color: var(--brand-cyan-light);
}
.metro-zoom-hint.visible {
  opacity: 1;
  visibility: visible;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.notes-modal {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 25px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-low);
  overflow: hidden;
  animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.modal-header {
  background: var(--bg-canvas);
  padding: 1rem 1.2rem;
  border-bottom: 2px solid var(--border-low);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 1.2rem;
  color: var(--brand-cyan-light);
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
}
.modal-body {
  padding: 1.2rem;
}
.modal-body textarea {
  width: 100%;
  border: 1px solid var(--border-low);
  border-radius: var(--radius-input);
  padding: 0.8rem;
  font-size: 0.9rem;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: inherit;
  resize: vertical;
  min-height: 180px;
}
.modal-footer {
  padding: 0.8rem 1.2rem 1.2rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}
.modal-footer button {
  padding: 0.5rem 1.2rem;
}
.btn-save-note {
  background: var(--brand-cyan);
  color: var(--bg-canvas);
  border: none;
}
.btn-save-note:hover {
  background: var(--brand-cyan-light);
  transform: none;
}
.btn-delete-note {
  background: rgba(239, 68, 68, 0.12);
  color: var(--status-danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-delete-note:hover {
  background: rgba(239, 68, 68, 0.22);
}
.leg-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.compact-item {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.65rem;
  border-left: 4px solid var(--status-planned);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: all 0.2s;
}
.compact-item.leg-booked {
  border-left-color: var(--status-success);
}
.compact-item.leg-selected {
  border-left-color: #f59e0b;
  border-left-width: 6px;
}
.compact-item:hover {
  background: #26364f;
  transform: translateX(2px);
  border-left-width: 6px;
}
.compact-item.leg-planned:hover {
  border-left-color: #f59e0b;
}
.compact-item.leg-booked:hover {
  border-left-color: #34d399;
}
.compact-item.leg-selected:hover {
  border-left-color: #f59e0b;
}
.compact-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.compact-leg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-canvas);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-input);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-cyan-light);
}
.compact-leg-badge i {
  font-size: 0.7rem;
}
.compact-action-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}
.compact-action-buttons button {
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  background: var(--bg-canvas);
}
.compact-action-buttons .notes-btn {
  background: rgba(16, 61, 185, 0.448);
}

.compact-action-buttons .notes-btn.has-notes {
  background: rgba(16, 185, 129, 0.12);
}
.compact-action-buttons .booking-toggle-btn.planned {
  background: rgba(217, 119, 6, 0.12);
}
.compact-action-buttons .booking-toggle-btn.booked {
  background: rgba(16, 185, 129, 0.12);
}
.compact-route-line {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  word-break: break-word;
}
.compact-dates {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.compact-costs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: var(--status-success);
}
.compact-costs span i {
  width: 14px;
  margin-right: 2px;
}
.print-map-report {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  max-width: 672px;
  visibility: hidden;
  pointer-events: none;
  z-index: -1;
  background: white;
  color: #111827;
}
.print-map-report.print-preparing {
  visibility: visible;
  left: -10000px;
}
.print-map-full,
.print-leg-map {
  width: 100%;
  height: 320px;
  border: 1px solid #ccc;
  margin: 0.5rem 0 1rem;
}
.print-map-full {
  height: 300px;
}
.print-itinerary-summary {
  margin: 0 0 1rem;
}
.print-itinerary-summary h2 {
  margin: 0 0 0.35rem;
}
.print-itinerary-summary ol {
  margin: 0;
  padding-left: 1.25rem;
}
.print-itinerary-summary li {
  margin: 0.15rem 0;
}
.print-leg {
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 1rem;
}
.print-leg-row {
  break-inside: avoid;
  page-break-inside: avoid;
}
.print-leg h3,
.print-map-report h2 {
  margin: 0 0 0.35rem;
}
@media (max-width: 850px) {
  .app-container {
    grid-template-columns: 1fr;
  }
  .map-container {
    min-height: 300px;
    aspect-ratio: auto;
    height: 50vh;
  }
  #map {
    min-height: 250px;
  }
  .sidebar {
    padding: 0 0.6rem 1rem 0.6rem;
  }
  .itinerary-header {
    gap: 0.5rem;
  }
  .itinerary-title-group h2 {
    font-size: 1rem;
  }
  .compact-toggle-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    min-width: 70px;
  }
  .add-leg-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    min-width: 70px;
  }
  .add-leg-btn i {
    margin-right: 3px;
  }
  .add-leg-btn .full-text {
    display: none;
  }
  .add-leg-btn .mobile-text {
    display: inline;
  }
  .button-group-inline {
    gap: 0.5rem;
  }
  .map-control-btn {
    padding: 4px 8px;
    font-size: 0.65rem;
  }
}
@media (max-width: 600px) {
  body {
    padding: 0.35rem;
    height: auto;
    min-height: 100svh;
    overflow: auto;
  }
  .app-container {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    height: auto;
    min-height: 100svh;
    padding: 0.45rem;
    overflow: visible;
  }
  .header-bar {
    order: 1;
    padding: 0.55rem;
    gap: 0.5rem;
    align-items: stretch;
  }
  .title {
    width: 100%;
    font-size: 1.25rem;
    line-height: 1.2;
  }
  .holiday-name-area {
    width: 100%;
    padding: 0.4rem;
    gap: 0.4rem;
  }
  .holiday-name-area label {
    flex: 0 0 auto;
    font-size: 0.78rem;
  }
  #holidayNameInput {
    flex: 1;
    width: auto;
    min-width: 0;
    font-size: 0.82rem;
  }
  .button-group {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem !important;
  }
  .button-group button,
  .button-group .file-label {
    justify-content: center;
    padding: 0.45rem 0.25rem;
    min-width: 0;
    font-size: 0.72rem;
  }
  .map-container {
    order: 2;
    height: 38svh;
    min-height: 260px;
    border-radius: var(--radius-card);
  }
  #map {
    min-height: 260px;
  }
  .sidebar {
    order: 3;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0 0.5rem 0.7rem;
  }
  .itinerary-header {
    padding: 0.55rem 0;
    align-items: flex-start;
  }
  .itinerary-title-group h2 {
    font-size: 0.95rem;
  }
  .button-group-inline {
    gap: 0.35rem;
  }
  .compact-toggle-btn,
  .add-leg-btn {
    min-width: 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.68rem;
  }
  .itinerary-item {
    padding: 0.65rem;
    margin-bottom: 0.6rem;
  }
  .flex-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .field {
    min-width: 0;
  }
  .field label {
    font-size: 0.6rem;
  }
  input,
  select,
  .nights-badge {
    min-height: 38px;
    font-size: 0.78rem;
  }
  .leg-actions {
    gap: 0.35rem;
  }
  .notes-btn,
  .booking-toggle-btn,
  .remove-btn {
    padding: 0.25rem 0.45rem;
    font-size: 0.65rem;
  }
  .compact-item {
    padding: 0.55rem 0.6rem;
  }
  .compact-header-row {
    align-items: flex-start;
  }
  .compact-action-buttons {
    width: 100%;
    justify-content: flex-end;
  }
  .compact-route-line {
    font-size: 0.8rem;
  }
  .compact-costs {
    gap: 0.45rem;
  }
  .map-toolbar {
    top: 8px;
    right: 8px;
  }
  .metro-zoom-hint {
    max-width: calc(100% - 16px);
    font-size: 0.62rem;
  }
  .app-version {
    display: none;
  }
}
@media (max-width: 420px) {
  .button-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flex-row {
    grid-template-columns: 1fr;
  }
  .map-container {
    height: 34svh;
    min-height: 220px;
  }
  #map {
    min-height: 220px;
  }
}
@media print {
  body {
    background: white;
    padding: 0;
    margin: 0;
  }
  .app-container {
    display: none !important;
  }
  .print-map-report {
    position: static;
    left: auto;
    top: auto;
    display: block;
    visibility: visible;
    pointer-events: auto;
    z-index: auto;
    width: 100%;
    max-width: 672px;
    margin: 0 auto;
    padding: 0.25in;
  }
  .print-map-full,
  .print-leg-map {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-map-full {
    height: 300px;
  }
  .print-leg-map {
    height: 320px;
  }
  .print-leg-row {
    page-break-after: always;
  }
  .print-leg-row:last-child {
    page-break-after: auto;
  }
  .print-itinerary-summary {
    font-size: 0.72rem;
    line-height: 1.25;
  }
  .header-bar,
  .map-container,
  .loading-indicator,
  .metro-zoom-hint,
  .modal-overlay,
  .itinerary-header button,
  .compact-action-buttons button,
  .remove-btn,
  .notes-btn,
  .leg-actions button,
  #toggleViewBtn,
  .add-leg-btn,
  .calendar-icon,
  .field label,
  input,
  select,
  .nights-badge,
  .compact-action-buttons,
  .map-toolbar {
    display: none !important;
  }
  .sidebar {
    max-height: none;
    overflow: visible;
    background: white;
    box-shadow: none;
    width: 100%;
  }
  .app-container {
    display: none !important;
    padding: 0;
    margin: 0;
    background: white;
  }
  .itinerary-item,
  .compact-item {
    border: 1px solid #ccc;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .cost-summary {
    border: 1px solid #ccc;
    background: #f9f9f9;
  }
}
